package com.sample.wanandroidx.ui.fragment

import android.os.Bundle
import com.sample.wanandroidx.basic.BaseFragment
import com.sample.wanandroidx.databinding.FragmentHomeBinding

//通用的List列表展示页
class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::inflate) {

    override fun initialization() {}

    override fun initLazyLoad() {

        val data: List<IntArray> = ArrayList<IntArray>(listOf(intArrayOf(1, 3), intArrayOf(4, 6), intArrayOf(7, 8)))
        data.forEach {
            println("==========" + it.get(0) + "=======" + it.get(1))
        }
    }

    companion object {
        const val KEY_INDEX = "KEY_INDEX"

        @JvmStatic
        fun newInstance(index: Int) = HomeFragment().apply {
            arguments = Bundle().apply {
                putInt(KEY_INDEX, index)
            }
        }
    }

}